package kr.hkit.powerjava.chapter22.collection;

import java.util.Collections;
import java.util.LinkedList;

public class LinkedListTest {
	public static void main(String[] args) {
		LinkedList<String> arList=new LinkedList<>();
		
		arList.add("MILK");
		arList.add("BREAD");
		arList.add("BUTTER");
		
		arList.add(1,"APPLE");
		arList.set(2,"GRApe");
		
		String temp=arList.remove(0);
		System.out.println("제거된 문자열"+ temp);
		
		Collections.sort(arList);
		for (String str : arList)
			System.out.println(str);
		
		
	}

}
